/*
 * Shop_10.cpp
 *
 *  Created on: 2012-8-21
 *      Author: huangyansheng
 */

#include "Shop_10.h"

//计算商品总价，price换成了id，修改为从id获取price
int Shop_10::total_10(int id, int number) {
	int price = p->getPrice(id);
	if (price < 0)
		return -1;
	else if (number < 0)
		return -1;
	else
		return price * number;
}


